package com.yunxiu.service.impl;

import com.yunxiu.entity.User;
import com.yunxiu.service.IUserServicer;
import com.yunxiu.service.base.IBaseServicerImpl;
import org.springframework.stereotype.Service;

/**
 * @author Deom
 */
@Service
public class UserServicerImpl extends IBaseServicerImpl  implements IUserServicer {
    @Override
    public boolean logion(String number, String pwd) {
        int flg=userMapper.login(number,pwd);
        return flg>0;
    }

    /**
     * 修改密码
     * @param
     * @return
     */
    @Override
    public int update(String number,String pwd) {
        int row=userMapper.update(number,pwd);
        return row;
    }

    /**
     * 通过id查找用户信息
     * @param id
     * @return
     */
    @Override
    public User findById(int id) {
        User user = userMapper.findById(id);
        return user;
    }

}
